Repository navigation
Conversation
There was a problem hiding this comment.
@kou can you confirm if this is needed with MinGW also (so WIN32 instead of MSVC)?
There was a problem hiding this comment.
I've confirmed. This isn't needed with MinGW.
...
[ RUN ] TestAllocate.Bitmap
C:/Users/kou/work/arrow/arrow.kou/cpp/src/arrow/testing/gtest_util.cc:120: Failure
Value of: buffer.Equals(expected)
Actual: false
Expected: true
[ FAILED ] TestAllocate.Bitmap (0 ms)
...
[ FAILED ] 1 test, listed below:
[ FAILED ] TestAllocate.Bitmap
1 FAILED TEST
...
There was a problem hiding this comment.
The googletest DLLs have to be put in the same directory as the build artifacts otherwise they won't be found when you run ctest
|
Hm, this worked locally for me but evidently needs some more fiddling to get it to work in. @pitrou do you want to try to fix it from here? I've sunk multiple hours into this now |
|
I could give it a try on Monday. |
There was a problem hiding this comment.
| "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=${BUILD_OUTPUT_ROOT_DIRECTORY}/Debug") | |
| "-DCMAKE_RUNTIME_OUTPUT_DIRECTORY_DEBUG=${BUILD_OUTPUT_ROOT_DIRECTORY}/${CMAKE_BUILD_TYPE}") |
or maybe BUILD_SUBDIR_NAME? This doesn't seem like it'd work with RelWithDebInfo, for example
There was a problem hiding this comment.
So MSVC adds these Release directories. Is it case sensitive?
|
@bkietz do you have access to a Windows environment to try to fix this? |
|
I'm going to take a half hour to try a few more things |
|
The normal MSVC builds passed but the static CRT build failed with The BUNDLED build in Travis CI is the only one failing but I haven't been able to repro the issue yet locally |
|
OK, the static CRT build links now, but fails at runtime. I fear that the combination of dynamic linking and static CRT may be incompatible |
|
I've been googling about this and it seems that there are potential issues with having different libraries or executable respectively using I would be inclined to either:
To continue to support this build configuration given how few Windows developers we have seems an undue hardship cc @Maxris @rip-nsk if you have any wisdom to offer about this situation
|
|
Hey @wesm , From https://docs.microsoft.com/en-us/cpp/c-runtime-library/crt-library-features?view=vs-2019 With above in mind, it sounds reasonable to not run unit tests, but to keep the build configuration just to verify that compilation passes without errors, so someone who will want to build their 3rd party application statically with static /MT linkage of runtime will get library compatibility out of the box. Please correct me if I have understood something wrong, thanks |
Same here. If people are interested in fixing the CMake build chain to enable statically-linked tests on Windows, they can submit a PR. |
|
There was already this comment in the build scripts: I'll continue to build the unit tests, but not run them |
|
We don't need to build the tests if we don't run them. |
|
Yeah I think you wrote it. Honestly I think we should just drop the static CRT build altogether for right now. The correct approach to actually test it is to build and link everything including Arrow and GTest statically. Are you OK with me disabling the static CRT Appveyor entry and opening a JIRA for someone else to work on it (if they care)? |
|
No problem from me. I think @Maxris originally added it so perhaps he has a different opinion, though. |
|
OK, opened ARROW-5426. This can be merged once the build passes. I'm about to get on an airplane so I can look at it later today |
There was a problem hiding this comment.
Shouldn't we force that only if the user didn't pass GTest_SOURCE explicitly?
|
Will address the outstanding issues on this tomorrow so we can get it merged |
Use gtest shared library, handle Windows-related quirks with EP build Always build bundled gtest on MSVC Fix up build on Linux Passing GTest_SOURCE=BUNDLED no longer needed on MSVC Try passing CMAKE_CXX_FLAGS as string in MSVC build Try something else ninja weirdness Use different RUNTIME_OUTPUT_DIRECTORY for Ninja build generator Fix up CMake args for googletest Try slightly different incantation cmake-format
|
Rebased. I'll merge this as soon as the build passes |
|
Hm, the Appveyor MinGW build is failed because of the NumPy issue. The MSVC builds look good though https://ci.appveyor.com/project/wesm/arrow/builds/24929805 @kou @pitrou @shiro615 are you OK with me merging this with the possible risk (low, since MinGW is more Linux-like) that there will be a subsequent issue? |
|
@wesm Fine with me at least. |
|
Please ping me if any issues are encountered and I can try to help |
|
No problem. |
Without this change, failed assertions do not cause failed unit tests on Windows as Antoine had discovered today.
The conda-forge test package seems unusable in shared library form so I'm forcing BUNDLED builds on MSVC (if not otherwise specified) and removing the hacks in the docs and Appveyor to pass
-DGTest_SOURCE=BUNDLEDAfter this change the static CRT Windows tests do not work anymore (because gtest.dll has its own copy of the static CRT, which leads to conflicts), so we will have to explore testing the static CRT build as follow up work. See ARROW-5426